"""
加载和保存数据的工具
"""
import pandas as pd
import os


def load_data(data_path, filename):
    """加载CSV数据"""
    file_path = os.path.join(data_path, filename)
    return pd.read_csv(file_path)


def save_data(df, save_path, filename):
    """保存数据到CSV"""
    file_path = os.path.join(save_path, filename)
    df.to_csv(file_path, index=False)


if __name__ == '__main__':
    data = load_data('../data', 'train.csv')
    print(data.columns)
